home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gtk-2.0 / gtk / gtklayout.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  4.4 KB  |  133 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Lesser General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  12.  * Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  *
  19.  * GtkLayout: Widget for scrolling of arbitrary-sized areas.
  20.  *
  21.  * Copyright Owen Taylor, 1998
  22.  */
  23.  
  24. /*
  25.  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  26.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  27.  * files for a list of changes.  These files are distributed with
  28.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  29.  */
  30.  
  31. #ifndef __GTK_LAYOUT_H__
  32. #define __GTK_LAYOUT_H__
  33.  
  34. #include <gdk/gdk.h>
  35. #include <gtk/gtkcontainer.h>
  36. #include <gtk/gtkadjustment.h>
  37.  
  38. G_BEGIN_DECLS
  39.  
  40. #define GTK_TYPE_LAYOUT            (gtk_layout_get_type ())
  41. #define GTK_LAYOUT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LAYOUT, GtkLayout))
  42. #define GTK_LAYOUT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LAYOUT, GtkLayoutClass))
  43. #define GTK_IS_LAYOUT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LAYOUT))
  44. #define GTK_IS_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LAYOUT))
  45. #define GTK_LAYOUT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LAYOUT, GtkLayoutClass))
  46.  
  47.  
  48. typedef struct _GtkLayout        GtkLayout;
  49. typedef struct _GtkLayoutClass   GtkLayoutClass;
  50.  
  51. struct _GtkLayout
  52. {
  53.   GtkContainer container;
  54.  
  55.   GList *children;
  56.  
  57.   guint width;
  58.   guint height;
  59.  
  60.   GtkAdjustment *hadjustment;
  61.   GtkAdjustment *vadjustment;
  62.  
  63.   /*< public >*/
  64.   GdkWindow *bin_window;
  65.  
  66.   /*< private >*/
  67.   GdkVisibilityState visibility;
  68.   gint scroll_x;
  69.   gint scroll_y;
  70.  
  71.   guint freeze_count;
  72. };
  73.  
  74. struct _GtkLayoutClass
  75. {
  76.   GtkContainerClass parent_class;
  77.  
  78.   void  (*set_scroll_adjustments)   (GtkLayout        *layout,
  79.                      GtkAdjustment  *hadjustment,
  80.                      GtkAdjustment  *vadjustment);
  81.  
  82.   /* Padding for future expansion */
  83.   void (*_gtk_reserved1) (void);
  84.   void (*_gtk_reserved2) (void);
  85.   void (*_gtk_reserved3) (void);
  86.   void (*_gtk_reserved4) (void);
  87. };
  88.  
  89. GType          gtk_layout_get_type        (void) G_GNUC_CONST;
  90. GtkWidget*     gtk_layout_new             (GtkAdjustment *hadjustment,
  91.                            GtkAdjustment *vadjustment);
  92. void           gtk_layout_put             (GtkLayout     *layout, 
  93.                                    GtkWidget     *child_widget, 
  94.                                    gint           x, 
  95.                                    gint           y);
  96.   
  97. void           gtk_layout_move            (GtkLayout     *layout, 
  98.                                    GtkWidget     *child_widget, 
  99.                                    gint           x, 
  100.                                    gint           y);
  101.   
  102. void           gtk_layout_set_size        (GtkLayout     *layout, 
  103.                                guint          width,
  104.                                guint          height);
  105. void           gtk_layout_get_size        (GtkLayout     *layout,
  106.                        guint         *width,
  107.                        guint         *height);
  108.  
  109. GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout     *layout);
  110. GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout     *layout);
  111. void           gtk_layout_set_hadjustment (GtkLayout     *layout,
  112.                        GtkAdjustment *adjustment);
  113. void           gtk_layout_set_vadjustment (GtkLayout     *layout,
  114.                        GtkAdjustment *adjustment);
  115.  
  116.  
  117. #ifndef GTK_DISABLE_DEPRECATED
  118. /* These disable and enable moving and repainting the scrolling window
  119.  * of the GtkLayout, respectively.  If you want to update the layout's
  120.  * offsets but do not want it to repaint itself, you should use these
  121.  * functions.
  122.  *
  123.  * - I don't understand these are supposed to work, so I suspect
  124.  * - they don't now.                    OWT 1/20/98
  125.  */
  126. void           gtk_layout_freeze          (GtkLayout     *layout);
  127. void           gtk_layout_thaw            (GtkLayout     *layout);
  128. #endif /* GTK_DISABLE_DEPRECATED */
  129.  
  130. G_END_DECLS
  131.  
  132. #endif /* __GTK_LAYOUT_H__ */
  133.